package com.aep.provisioning.service;

import java.math.BigDecimal;
import java.util.List;

import com.aep.provisioning.controller.form.ContactForm;
import com.aep.provisioning.domain.EspRateCode;
import com.aep.provisioning.domain.Geography;


public class WebFacadeImpl implements WebFacade{

	private EspRateCodeService espRateCodeService;
	private CommonService commonService;

	/**
	 * Method that sets the service injected by bean.
	 * @param espRateCodeService
	 */
	public void setEspRateCodeService(EspRateCodeService espRateCodeService) {
		this.espRateCodeService = espRateCodeService;
	}
	
	/**
	 * Method that sets the service injected by bean.
	 * @param commonService
	 */
	public void setCommonService(CommonService commonService) {
		this.commonService = commonService;
	}
	
	/**
	 * CommonService
	 * */
	
	public void saveContact(ContactForm contactForm){
		commonService.saveContract(contactForm);
	}
	public List<Geography> listDepartamentos(){
		return commonService.listDepartamentos();
	}
	public List<Geography> listProvincias(Long idDepartamento){
		return commonService.listProvincias(idDepartamento);
	}




	/**
	 * EspRateCodeService
	 * */
	
	public List<EspRateCode> findListEspRateCodeMonthly (Long utilityID,String plan){
		return espRateCodeService.findListEspRateCodeMonthly(utilityID, plan);
	}
	public List<EspRateCode> findStandardERateCodekWhRate (Long utilityID,String plan,BigDecimal monthly){
		return espRateCodeService.findStandardERateCodekWhRate(utilityID, plan, monthly);
	}
	public List<EspRateCode> findStandardERateCodekWRate (Long utilityID,String plan,BigDecimal monthly,BigDecimal kWhRate){
		return espRateCodeService.findStandardERateCodekWRate(utilityID, plan, monthly, kWhRate);
	}
	public EspRateCode findStandardERateCode(Long utilityID, String plan,BigDecimal monthly,BigDecimal kWhRate,BigDecimal kWRate){
		return espRateCodeService.findStandardERateCode(utilityID, plan, monthly, kWhRate, kWRate);
	}
	public List<EspRateCode> findSeasonalERateCodeSummerkWh(Long utilityID, String plan,BigDecimal monthly){
		return espRateCodeService.findSeasonalERateCodeSummerkWh(utilityID, plan, monthly);
	}
	public List<EspRateCode> findSeasonalERateCodeNonSummerkWh(Long utilityID, String plan,BigDecimal monthly,BigDecimal summerKWhRate){
		return espRateCodeService.findSeasonalERateCodeNonSummerkWh(utilityID, plan, monthly, summerKWhRate);
	}
	public List<EspRateCode> findSeasonalERateCodekW(Long utilityID, String plan,BigDecimal monthly,BigDecimal summerKWhRate,BigDecimal nonSummerKWhRate){
		return espRateCodeService.findSeasonalERateCodekW(utilityID, plan, monthly, summerKWhRate, nonSummerKWhRate);
	}
	public EspRateCode findSeasonalERateCode(Long utilityID, String plan,BigDecimal monthly,BigDecimal summerKWhRate,BigDecimal nonSummerKWhRate,BigDecimal kWRate){
		return espRateCodeService.findSeasonalERateCode(utilityID, plan, monthly, summerKWhRate, nonSummerKWhRate, kWRate);
	}
	public List<EspRateCode> findListDiscount(Long utilityID, String plan){
		return espRateCodeService.findListDiscount(utilityID, plan);
	}
	public EspRateCode findDiscountERateCode(Long utilityID, String plan, BigDecimal discountAmount){
		return espRateCodeService.findDiscountERateCode(utilityID, plan,discountAmount);
	}
	public EspRateCode findEspRateCode(Long utilityID,String rateCode){
		return espRateCodeService.findEspRateCode(utilityID, rateCode);
	}
	public EspRateCode findEspRateCodeByPrice(Long utilityId, BigDecimal price){
		return espRateCodeService.findEspRateCodeByPrice(utilityId, price);
	}
	
}
